import request from '@/utils/request.js';
// 查询热销商品
export const reqRecommendGoodsList = data => request({ url: '/commodity/selectRecommend', method: 'GET', params: data });

// 获取非标品分类
export const reqGetNonStandardCategory = data => request({ url: '/nonCategory/selectList', method: 'GET', params: data });

// 获取非标商品
export const reqGetNonStandardGoods = data => request({ url: '/non/selectList', method: 'GET', params: data });

// 获取非标商品详情
export const reqGetNonStandardGoodsDetail = data => request({ url: '/non/selectDetail', method: 'GET', params: data });

// 搜索商品
export const reqSearchGoods = data => request({ url: '/commodity/selectSearch', method: 'GET', params: data });

// 搜索非标商品
export const reqSearchNonStandardGoods = data => request({ url: '/non/selectSearch', method: 'GET', params: data });

// 添加商品到购物车
export const reqAddGoodsToCart = data => request({ url: '/cart/insert', method: 'POST', data: data });

// 获取购物车列表
export const reqGetCartList = data => request({ url: '/cart/select', method: 'GET', params: data });

// 查询购物车总金额
export const reqTotalCount = () => request({ url: '/cart/selectTotal', method: 'GET' });

// 删除购物车商品
export const reqDeleteCartGoods = data => request({ url: '/cart/delete', method: 'DELETE', data: data });

// 获取购物车起送价格
export const reqGetCartStartPrice = () => request({ url: '/cart/selectPrice', method: 'GET' });
// 全局商品搜索
export const reqAllSearch = data => request({ url: '/commodity/selectFrontSearch', method: 'GET', params:data });